package com.learn.jdk;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Copyright: Copyright (c) 2019 Asiainfo
 *
 * @ClassName: com.learn.jdk.ListTest
 * @Description: 该类的功能描述
 * @version: v1.0.0
 * @author: lipan
 * @date: 2019/10/20 10:44
 * <p>
 * Modification History:
 * Date         Author          Version            Description
 * ------------------------------------------------------------
 * 2019/10/20      lipan          v1.0.0               修改原因
 */

public class ListTest {

    public static void main(String[] args) {
        List<String> list= Arrays.asList("1","2","3");

        //传入comsumer接口->accept方法
        list.forEach(
                string-> System.out.println(string)
        );


        //方法引用::代表实现了comsumer
        list.forEach(System.out::println);
    }
}
